package query

import (
	dto "ssadmin/common/query"
)

type SysDataDetailQuery struct {
	dto.Pagination `search:"-"`
	dto.OrderBy    `search:"-"`
	dto.UserInfo

	DeptId     string `form:"deptId" search:"-"`
	StartTime  string `form:"startTime" search:"-"`
	EndTime    string `form:"endTime" search:"-"`
	DataType   string `form:"dataType" search:"-" vd:"len($)>0"`
	IntervalH  int    `form:"intervalH" search:"-"`
	LimitCount int    `form:"limitCount" search:"-"`

	DeptIdIn []string `search:"-"`
	KeyIn    []string `search:"type:in;column:key;table:sys_data_detail"`
	TypeEq   string   `search:"type:exact;column:type;table:sys_data_detail"`
	TimeGte  string   `search:"type:gte;column:create_time;table:sys_data_detail"`
	TimeLte  string   `search:"type:lte;column:create_time;table:sys_data_detail"`
}

type SysDataKeepQuery struct {
	dto.UserInfo

	AgencyIdEq string `search:"type:exact;column:agency_id;table:sys_data_keep"`
}

type SysConfQuery struct {
	dto.UserInfo

	Key   string   `search:"type:exact;column:key;table:sys_conf"`
	KeyIn []string `search:"type:in;column:key;table:sys_conf"`
}
